package cn.imnaer.common.factory;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringCheckUtils {
		public static boolean isMobileNO(String mobiles) {
			Pattern p = Pattern.compile("^((1[0-9][0-9])|(15[^4,\\D])|(18[0-9]))\\d{8}$");
			Matcher m = p.matcher(mobiles);
			return m.matches();
    }
		 public static String replaceEnlishCharacter(String stringInfo){  	  
		         Pattern p=Pattern.compile("[.,\"\\?!:']");//增加对应的标点  		  
		         Matcher m=p.matcher(stringInfo);  		  
		         String first=m.replaceAll(""); //把英文标点符号替换成空，即去掉英文标点符号  		  
		         p=Pattern.compile(" {2,}");//去除多余空格  		  
		         m=p.matcher(first);  
		         String second=m.replaceAll(" ");  
		       return  second;
		     }  
}